Imports System.ComponentModel
Imports System.Data
Imports System.Windows.Forms

Public Class ACFlexGrid

#Region " Variables "
   Private bs_data As BindingSource
   Private m_contenido As Object
#End Region

#Region " Propiedades "
   <Description("Contenedor de Datos."), _
   Category("AcerosComerciales"), DefaultValue(""), Browsable(True)> _
   Public Property Data() As Object
      Get
         Return m_contenido
      End Get
      Set(ByVal value As Object)
         m_contenido = value
         setDatos()
      End Set
   End Property

   <Description("Componente contenedor de datos C1FlexGrid."), _
   Category("AcerosComerciales"), DefaultValue(""), Browsable(True)> _
   Public Property ACC1FlexGrid() As C1.Win.C1FlexGrid.C1FlexGrid
      Get
         Return c1Flex
      End Get
      Set(ByVal value As C1.Win.C1FlexGrid.C1FlexGrid)
         c1Flex = value
      End Set
   End Property

   <Description("Componente de navegacion."), _
   Category("AcerosComerciales"), DefaultValue(""), Browsable(True)> _
   Public Property ACBindingNavigator() As System.Windows.Forms.BindingNavigator
      Get
         Return bnav
      End Get
      Set(ByVal value As System.Windows.Forms.BindingNavigator)
         bnav = value
      End Set
   End Property

#End Region

#Region " Constructores "

#End Region

#Region " Metodos "
   Private Sub setDatos()
      Try
         bs_data = New BindingSource()
         bs_data.DataSource = m_contenido
         c1Flex.DataSource = bs_data
         bnav.BindingSource = bs_data
      Catch ex As Exception
         Throw ex
      End Try
   End Sub
#End Region

#Region " Metodos de Controles"

#End Region

End Class
